package com.cmc.cloud.cmclink.doc.api.document;


import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest.ManifestEdiQueryReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest.ManifestEdiReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest.ManifestInfoEdiRespVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest.ManifestRespVO;
import com.cmc.cloud.cmclink.doc.service.manifest.ManifestService;
import com.cmes.framework.common.pojo.CommonResult;
import com.cmes.framework.security.core.util.SecurityFrameworkUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author wdq
 * @date 2025/7/7
 */
@RestController
@Validated
public class ManifestEdiApiImpl implements ManifestEdiApi {

    @Resource
    private ManifestService manifestService;

    @Override
    public CommonResult<String> manifestSync(ManifestEdiReqVO ediInfo) {
        return manifestService.manifestEdiSync(ediInfo, String.valueOf(SecurityFrameworkUtils.getLoginUserId()));
    }

    @Override
    public CommonResult<List<ManifestInfoEdiRespVO>> manifestDetailQuery(ManifestEdiQueryReqVO ediInfo) {
        return manifestService.manifestEdiDetailQuery(ediInfo);
    }

    @Override
    public CommonResult<List<ManifestRespVO>> manifestQuery(ManifestEdiQueryReqVO ediInfo) {
        return manifestService.manifestEdiQuery(ediInfo);
    }

}
